package app.kotlin_1.basemvp

/**
 * Created by 刘智强 on 2017/10/13.
 */
class TestPresenter : BasePresenter<BaseView<TestModel>, TestModel>() {
    override fun attachView(v: BaseView<TestModel>) {
        view = v
    }

    override fun setData(model: TestModel) {
        view?.showLoading()
        Thread.sleep(2000)
        view?.updateUi(model)
        Thread.sleep(2000)
        view?.dismissLoading()
    }

    override fun dettachView() {
        view = null
    }

    override fun getDataFromModel(): TestModel {
        var model = TestModel("")
        return model?.getModelFromNet()


    }
}